chore(stack): EQL v3 maintainability follow-ups from the #547 review#550
Conversation
- encryption/v3: reconstructRow → rowReconstructor factory — the table config (build() + buildColumnKeyMap()) is row-invariant but was rebuilt per row on the bulk decrypt path; it is now derived once per call site, with date columns resolved up front - encrypt operations: replace the two inline NaN/Infinity guard copies with the existing assertValidNumericValue helper (validation.ts) - schema/match-defaults: single source of truth for the default match index parameters (previously duplicated between the v2 freeTextSearch builder and the v3 domain builders) plus a shared cloneMatchOpts deep-clone used at all three v3 clone sites - tests: one shared live-gate helper (LIVE_CIPHERSTASH_ENABLED / LIVE_EQL_V3_PG_ENABLED + describeLive/describeLivePg) replaces the gate blocks copy-pasted across seven live suites No behavioral changes: emitted encrypt configs are byte-identical (schema-v3 fixture tests unchanged), guard error messages unchanged, gating semantics unchanged.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merging with the base branch's known red check: the |
Addresses the ⚪ maintainability items from the consolidated review on #547 that live in this stack's base files (not in #547's diff):
reconstructRowrebuilt table config per row — now arowReconstructor(table)factory:build()+buildColumnKeyMap()run once per call site instead of once per row on the bulk decrypt path, and date columns are resolved up front.assertValidNumericValue(validation.ts). Error messages unchanged.defaultMatchOptsduplicated v2's values + match deep-clone ×3 — newsrc/schema/match-defaults.tsis the single source of truth for the default match parameters (consumed by both the v2freeTextSearch()builder and the v3 domain builders) and provides onecloneMatchOptsused at all three v3 clone sites. Emitted configs are byte-identical (the schema-v3 fixture tests pass unchanged).__tests__/helpers/live-gate.ts(LIVE_CIPHERSTASH_ENABLED/LIVE_EQL_V3_PG_ENABLED+describeLive/describeLivePg) replaces the identical gate blocks in seven live suites, so the credential list can't drift between files.No behavioral changes intended. Verified: 0
src/type errors (the__tests__/schema-v3.test.tserrors are pre-existing on the clean base — same count before/after); schema-v3 + schema-builders + v3-matrix + guard suites all pass.Targets
feat/eql-v3-types-moduleso the changes flow up the stack. Sibling of #547.Not included (main-branch code, separate fixes): the
identify()auth-downgrade warning andresolveLockContexterror type (identity layer), and thematrix-identity-livefalse-green / OidcFederationStrategy smoke test items (belong with the identity-layer test work).